package org.example;

import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
public class Order implements Serializable {
    private static final long serialVersionUID = 1L;
    
    private Long orderId;
    private String orderNo;
    private BigDecimal amount;
    private Integer status;  // 0:待支付 1:已支付 2:已取消
    private Date createTime;
    private String userId;
    
    public Order() {}
    
    public Order(Long orderId, String orderNo, BigDecimal amount, String userId) {
        this.orderId = orderId;
        this.orderNo = orderNo;
        this.amount = amount;
        this.userId = userId;
        this.status = 0;
        this.createTime = new Date();
    }
}